package demo9;

public class QueueStackMain {
    public static void main(String[]args){
        QueueStack queue=new QueueStack();
        queue.push(9);
        queue.push(8);
        queue.push(5);
        queue.push(4);
        queue.push(2);
        int val2=queue.top();//获取栈顶元素

        System.out.println("栈顶元素为："+val2);
        int val1=queue.pop();
        System.out.println("获取并删除栈顶元素为："+val1);
        queue.display(queue.qu1);

    }
}
